package com.mybatis.boost.tool;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;

/**
 * @author jearton
 * @since 2017/2/7
 */
public abstract class InetUtil {
    public static int getIpAddressAsInt() throws UnknownHostException {
        InetAddress inetAddress = InetAddress.getLocalHost();
        return ByteBuffer.wrap(inetAddress.getAddress()).getInt();
    }
}
